/**
 * 
 */
package model.semantics;

import model.RGBColor;

/**
 * Token class for operations. To be used in reflection.
 * 
 * @author Troy Ferrell
 *
 */
public abstract class OperationToken extends AbstractToken 
{
	protected int myNumArguments;
	protected boolean leftAssociative;

	public OperationToken(int precedence)
	{
		super(precedence);
	}

	/* (non-Javadoc)
	 * @see model.semantics.AbstractToken#evaluateSafely(model.RGBColor[])
	 */
	@Override
	protected abstract RGBColor evaluateSafely(RGBColor[] colors);
	
	public int getNumArguments() 
	{
		return myNumArguments;
	}

	public void setNumArguments(int numArguments) 
	{
		this.myNumArguments = myNumArguments;
	}
	
	public boolean isLeftAssociative()
	{
		return leftAssociative;
	}
}
